﻿#ifndef VIDEOITEM_H
#define VIDEOITEM_H

#include <QWidget>
#include <QUrl>

namespace Ui {
class VideoItem;
}

class VideoItem : public QWidget
{
    Q_OBJECT

public:
    explicit VideoItem(const QUrl &url, QWidget *parent = nullptr);
    ~VideoItem();

    inline QString get_absolute_path() {return url_.toLocalFile();}
    inline QString get_filename() {return url_.fileName();};
    void set_state(const QString &state);
    void set_progress(int value);
    QString get_state();
    void show_btn();

private:
    Ui::VideoItem *ui;

    QUrl url_;

signals:
    void btn_clicked();
};

#endif // VIDEOITEM_H
